package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectContentEntityMapper;
import com.ly.heart.domain.ProjectContentEntity;
import com.ly.heart.service.IProjectContentEntityService;

/**
 * 项目内容Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectContentEntityServiceImpl implements IProjectContentEntityService
{
    @Autowired
    private ProjectContentEntityMapper projectContentEntityMapper;

    /**
     * 查询项目内容
     *
     * @param id 项目内容主键
     * @return 项目内容
     */
    @Override
    public ProjectContentEntity selectProjectContentEntityById(String id)
    {
        return projectContentEntityMapper.selectProjectContentEntityById(id);
    }

    /**
     * 查询项目内容列表
     *
     * @param projectContentEntity 项目内容
     * @return 项目内容
     */
    @Override
    public List<ProjectContentEntity> selectProjectContentEntityList(ProjectContentEntity projectContentEntity)
    {
        return projectContentEntityMapper.selectProjectContentEntityList(projectContentEntity);
    }

    /**
     * 新增项目内容
     *
     * @param projectContentEntity 项目内容
     * @return 结果
     */
    @Override
    public int insertProjectContentEntity(ProjectContentEntity projectContentEntity)
    {
        projectContentEntity.setCreateTime(DateUtils.getNowDate());
        return projectContentEntityMapper.insertProjectContentEntity(projectContentEntity);
    }

    /**
     * 修改项目内容
     *
     * @param projectContentEntity 项目内容
     * @return 结果
     */
    @Override
    public int updateProjectContentEntity(ProjectContentEntity projectContentEntity)
    {
        return projectContentEntityMapper.updateProjectContentEntity(projectContentEntity);
    }

    /**
     * 批量删除项目内容
     *
     * @param ids 需要删除的项目内容主键
     * @return 结果
     */
    @Override
    public int deleteProjectContentEntityByIds(String[] ids)
    {
        return projectContentEntityMapper.deleteProjectContentEntityByIds(ids);
    }

    /**
     * 删除项目内容信息
     *
     * @param id 项目内容主键
     * @return 结果
     */
    @Override
    public int deleteProjectContentEntityById(String id)
    {
        return projectContentEntityMapper.deleteProjectContentEntityById(id);
    }
}
